package com.dks.controller;

import java.util.*;

import com.dks.mapper.InvitationRecordDetailMapper;
import com.dks.models.InvitationRecordDetail;
import com.dks.repository.IInvitationRecordDetailRepository;
import com.dks.result.Result;
import com.dks.result.ResultInfo;
import com.dks.result.ResultModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RequestMapping("invitation-record-detail")
@RestController
public class InvitationRecordDetailController{

    private IInvitationRecordDetailRepository invitationRecordDetailRepository;

    private InvitationRecordDetailMapper invitationRecordDetailMapper;

    @Autowired
    public InvitationRecordDetailController(final IInvitationRecordDetailRepository invitationRecordDetailRepositoryIn,
                                            final InvitationRecordDetailMapper invitationRecordDetailMapper){
        this.invitationRecordDetailRepository = invitationRecordDetailRepositoryIn;
        this.invitationRecordDetailMapper = invitationRecordDetailMapper;
    }

    /**
     * @Author: Ah Nan
     * @Description: 获取邀请介绍
     * @Date: 9:52 2020/4/23
     * @Modificd By:
     * @return:
     * @throw: 请描述异常信息
     */
    @GetMapping("get-record-detail")
    public ResultModel<Object> getRecordDetail() {
        Map<String,Object> map = new HashMap<>();
        map.put("size",1);
        List<InvitationRecordDetail> invitationRecordDetailList = invitationRecordDetailMapper.getByMapList(map);
        return Result.makeResult(ResultInfo.SUCCESS, invitationRecordDetailList);

    }

}
